package com.xquant.marketdata.marketdata.service.impl;

import com.xquant.common.redis.service.RedisService;
import com.xquant.marketdata.marketdata.domain.*;
import com.xquant.marketdata.marketdata.mapper.TcmdtMapper;
import com.xquant.marketdata.marketdata.service.TcmdtService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * @Auther: B946
 * @Date: 23/12/2019 10:17
 * @Description:
 */
@Service
public class TcmdtServiceImpl implements TcmdtService {


    @Autowired
    private TcmdtMapper tcmdtInfoMapper;
    @Autowired
    private RedisService redisService;


    @Override
    public List<CmdtInfoDTO> queryTcmdtInfoByPage(Map<String, Object> params) {
        return tcmdtInfoMapper.queryTcmdtInfoByPage(params);
    }

    @Override
    public List<CmdtPriceDTO> queryTcmdtPriceByPage(Map<String, Object> params) {

        List<CmdtPriceDTO> cmdtPriceDTOS = tcmdtInfoMapper.queryTcmdtPriceByPage(params);

        return cmdtPriceDTOS;
    }

    @Override
    public List<TcmdtfutureDTO> selectTcmdtfutureList(Map<String, Object> params) {
        return tcmdtInfoMapper.selectTcmdtfutureList(params);
    }

    @Override
    public List<TcmdtfuturePriceDTO> selectTcmdtfuturePriceList(Map<String, Object> params) {
        return tcmdtInfoMapper.selectTcmdtfuturePriceList(params);
    }

    @Override
    public List<TcmdtdelPriceDTO> selectTcmdtdelPriceList(Map<String, Object> params) {
        return tcmdtInfoMapper.selectTcmdtdelPriceList(params);
    }

    @Override
    public List<TcmdtdelDTO> selectTcmdtdelList(Map<String, Object> params) {
        return tcmdtInfoMapper.selectTcmdtdelList(params);
    }

    @Override
    public void updateTcmdtPrice(CmdtPriceDTO cmdtPriceDTO) {
        tcmdtInfoMapper.updateTcmdtPrice(cmdtPriceDTO);
    }

    @Override
    public void updateTcmdtFuturePrice(TcmdtfuturePriceDTO tcmdtfuturePriceDTO) {
        tcmdtInfoMapper.updateTcmdtFuturePrice(tcmdtfuturePriceDTO);
    }

    @Override
    public void updateTcmdtDelPrice(TcmdtdelPriceDTO tcmdtdelPriceDTO) {
        tcmdtInfoMapper.updateTcmdtDelPrice(tcmdtdelPriceDTO);
    }
}
